package com.wjs.gulimall.gulimallmember.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.wjs.gulimall.gulimallmember.entity.MemberEntity;
import com.wjs.gulimall.gulimallmember.exception.PhoneExsitException;
import com.wjs.gulimall.gulimallmember.exception.UsernameExsitException;
import com.wjs.gulimall.gulimallmember.vo.MemberLoginVo;
import com.wjs.gulimall.gulimallmember.vo.MemberRegistVo;
import com.wjs.gulimall.gulimallmember.vo.SocialUserVo;

import java.util.Map;

/**
 * 会员
 *
 * @author wangjingsong
 * @email wangjingsong@gmail.com
 * @date 2022-04-17 15:26:57
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 注册方法，给Auth-server服务远程调用
     * @param vo
     */
    void regist(MemberRegistVo vo);

    void checkUsernameUnique(String username) throws UsernameExsitException;

    void checkPhoneUnique(String phone) throws PhoneExsitException;

    MemberEntity login(MemberLoginVo vo);

    MemberEntity Oauthlogin(SocialUserVo vo) throws Exception;
}

